
class Connection
  #attributes that are specific to the connection
  #name < the connection name
  #release ip<the flag that indicates whether an ip address should be released if requested
  #ip<the ip address of the peer
  #list_name<the flag that indicates wheter the name should be listed when a list of names is requested
  #clent_port<the port that the client is connecting on
  #socket<the socket that is used for the connection. Only used for when a connection is iniated by this peer
  #self_name<the name that this peer has registered against the other peer
  attr_accessor :name, :release_ip, :ip, :list_name, :client_port, :socket, :self_name, :disconnect
  #the static list of connections
  @@connections = Array.new
  def initialize(name)
    @disconnect = false
    @name = ""
    @message_queue = Array.new
    @release_ip = true
    @list_name = true
    @self_name = name
    @challange_pairs = Array.new
    #adds the new connection to the list of connections
    @@connections.push(self)
  end
  #the setter for the connections list
  def Connection.connections=(c)
    @@connections = c
  end
  #the getter for the connections list
  def Connection.connections
    @@connections
  end
  #ahem. -> perhaps these would be best moved to the NetworkCommunicator class.
  #the challange pair sette
end
